Caption = "This applet puts 0 to 255 on the parallel data pins (LPT1:) separated by a delay of 100 milliseconds."
Height = 375
Left = 240
TabIndex = 6
Top = 240
Width = 5535
End
Begin VB.Label Label2
Caption = "Parallel Port Data"
Height = 255
Left = 2160
TabIndex = 4
Top = 1680
Width = 1335
End
Begin VB.Label Label1
Caption = "Parallel Port Data"
Height = 255
Left = 2160
TabIndex = 2
Top = 960
Width = 1335
End
Begin IOLib.IO IO1
Left = 5880
Top = 0
_Version = 65536
_ExtentX = 1270
_ExtentY = 1270
_StockProps = 0
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim Result As Integer
Dim N As Integer
Result = IO1.Open("LPT1:", "")
If (Result = 0) Then
MsgBox ("Open failed")
End If
For N = 0 To 255
Result = IO1.WriteByte(N)
Text1.Text = N
IO1.Sleep (100)
DoEvents 'Allows text box to be updated
If (Result = 0) Then
MsgBox ("WriteByte failed, make sure the parallel loopback connections are made." + Chr(13) + "See: 'schematics.html' or visit: 'http://members.aol.com/easyio/home.html'.")